# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ruby-multi_xml
_pkgname=multi_xml
pkgver=0.7.2
pkgrel=1
pkgdesc='Provides swappable XML backends utilizing LibXML, Nokogiri, Ox, or REXML.'
arch=('any')
url='https://rubygems.org/gems/multi_xml'
license=('MIT')
depends=('ruby' 'ruby-bundler')
makedepends=('ruby-rdoc')
source=("https://rubygems.org/gems/$_pkgname-$pkgver.gem")
sha512sums=('65f6a9c7ce3b1dea384fb3868c1e3cd09c94c29aba59e6662e3118aec5f248f6e86a49ff0b2b18bd7a811fae652ef9e8ee7e1965570cb1c1de82f67ca6432db8')
noextract=("$_pkgname-$pkgver.gem")

package() {
  _gemdir="$(ruby -e 'puts Gem.default_dir')"

  if [[ $CARCH == arm* ]] ; then
    gem install --no-user-install --ignore-dependencies --no-rdoc --no-ri \
      -i "$pkgdir$_gemdir" "$_pkgname-$pkgver.gem"
  else
    gem install --ignore-dependencies --no-user-install -i "$pkgdir/$_gemdir" \
      -n "$pkgdir/usr/bin" "$_pkgname-$pkgver.gem"
  fi
}

